home *** CD-ROM | disk | FTP | other *** search
/ Transactor / Transactor_12_1986_Transactor_Publishing.d64 / improve sys.pal (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  870b  |  42 lines

  1. 100 rem printer version
  2. 120 open4,4
  3. 130 print#4,chr$(27)"p"chr$(66)
  4. 140 close4
  5. 150 open4,4,2
  6. 160 sys700
  7. 170 .opt oo,p4
  8. 180 ;
  9. 190 ;ml print at
  10. 200 ;
  11. 210 ;
  12. 220 chrget = $73 ;get next character
  13. 230 errprt = $a437 ;print error type .x
  14. 240 print = $aaa0 ;basic print
  15. 250 comchk = $aefd ;check for comma
  16. 260 evalxr = $b79e ;put exp in .x 0-255
  17. 270 setcrs = $fff0 ;kernal-place cursor
  18. 280 *= $c000
  19. 290 ;
  20. 300 jsr comchk ;check for comma
  21. 310 jsr evalxr ;evaluate col in .x
  22. 320 cpx col
  23. 330 bcs error ;branch if col >= 40
  24. 340 txa
  25. 350 pha ;store col on stack
  26. 360 jsr comchk ;check for comma
  27. 370 jsr evalxr ;evaluate row in.x
  28. 380 cpx row
  29. 390 bcs error ;branch if row >= 25
  30. 400 pla ;get col from stack
  31. 410 tay
  32. 420 clc
  33. 430 jsr setcrs ;set cursor at x,y
  34. 440 jsr chrget ;first char for print
  35. 450 jmp print
  36. 460 rts
  37. 470 error ldx toobig ;parameter too big
  38. 480 jmp errprt ;print error .x
  39. 490 col .byte 40 ;# of columns
  40. 500 row .byte 25 ;#of rows
  41. 510 toobig .byte 14 ;illegal quantity
  42.